// 配置编译环境和线上环境之间的切换
import { getToken } from "../util/store";
let baseUrl = '';
let iconfontVersion = ['567566_pwc3oottzol'];
let iconfontUrl = `//at.alicdn.com/t/font_$key.css`;
let codeUrl = `${baseUrl}/code`;
//im相关
// let SOCKET_SERVER = "ws:test.lightkitch.com:18001";
let SOCKET_SERVER = "ws:testapimall.sunac.com.cn:im";
//素材相关参数
let OSS_URL = "https://keytest.oss-cn-zhangjiakou.aliyuncs.com/";
// let OSS_URL = "https://mall-rongchuang.oss-cn-beijing.aliyuncs.com/";

const env = process.env
if (env.NODE_ENV == 'development') {
  baseUrl = `http://127.0.0.1:1888/`; // 开发环境地址
} else if (env.NODE_ENV == 'production') {
  if(env.VUE_APP_FLAG == 'pro'){
    
      // OSS_URL = "https://mall-rongchuang.oss-cn-beijing.aliyuncs.com/";
        // baseUrl = `https://op.sunac.com.cn/`; //正式
        // SOCKET_SERVER = "wss://op.sunac.com.cn/im";
    	// OSS_URL = "https://mall-rongchuang.oss-cn-beijing.aliyuncs.com/";
    	// baseUrl = `https://store.sunac.com.cn/`; //正式
    	// SOCKET_SERVER = "wss://store.sunac.com.cn/im";
        OSS_URL = "https://mall-rongchuang.oss-cn-beijing.aliyuncs.com/";
        baseUrl = `https://testadminmall.sunac.com.cn/`; //生产环境地址
        SOCKET_SERVER = "wss://testadminmall.sunac.com.cn/im";
  }else{
    //test测试环境
    
      // OSS_URL = "https://mall-rongchuang.oss-cn-beijing.aliyuncs.com/";
        // baseUrl = `https://op.sunac.com.cn/`; //正式
        // SOCKET_SERVER = "wss://op.sunac.com.cn/im";
    	// OSS_URL = "https://mall-rongchuang.oss-cn-beijing.aliyuncs.com/";
    	// baseUrl = `https://store.sunac.com.cn/`; //正式
    	// SOCKET_SERVER = "wss://store.sunac.com.cn/im";
        OSS_URL = "https://mall-rongchuang.oss-cn-beijing.aliyuncs.com/";
        baseUrl = `https://testadminmall.sunac.com.cn/`; //生产环境地址
        SOCKET_SERVER = "wss://testadminmall.sunac.com.cn/im";
  }
}
export {
  baseUrl,
  iconfontUrl,
  iconfontVersion,
  codeUrl,
  SOCKET_SERVER,
  OSS_URL,
  env
}
